package com.jing21.learn.basic.api.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;
import java.util.Collections;
import java.util.Map;

/**
 * Created by 郑靖 on 2017/9/24.
 */
@RestController
@RequestMapping("/product")
public class ProductApiController {

    @GetMapping("/test")
    public String test(){
        return "test";
    }

    @GetMapping("/datetime")
    public Map<String,Object> product(){

        return Collections.singletonMap("datetime", LocalDateTime.now());
    }
}
